<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>流程图</title>
    <style>
        html, body, #diagram {
            height: 100%
        }
    </style>
</head>
<body>
<div id="diagram"></div>

<script th:src="@{/layuimini/lib/bpmn-js/bpmn-modeler.development.js}"></script>
<script th:src="@{/layuimini/js/jquery.min.js}"></script>

<!-- app -->
<script>
    var deploymentId='[[${deploymentId}]]';
    var name='[[${name}]]';
    var viewer = new BpmnJS({
        container: '#diagram',
        additionalModules: [
            {
                paletteProvider: ["value", ''], //禁用/清空左侧工具栏
                labelEditingProvider: ["value", ''], //禁用节点编辑
                contextPadProvider: ["value", ''], //禁用图形菜单
                bendpoints: ["value", {}], //禁用连线拖动
                zoomScroll: ["value", ''], //禁用滚动
                moveCanvas: ['value', ''], //禁用拖动整个流程图
                move: ['value', ''] //禁用单个图形拖动
            }
        ]
    });

    function showDiagram(result) {
        viewer.importXML(result.data)
    }
    $.get('resource?deploymentId=' + deploymentId + '&name=' + name, showDiagram, 'json');
</script>
</body>
</html>
